package com.ruoyi.InboundManagement.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.InboundManagement.mapper.SalesReturnInboundMapper;
import com.ruoyi.InboundManagement.domain.SalesReturnInbound;
import com.ruoyi.InboundManagement.service.ISalesReturnInboundService;

/**
 * 销售退货入库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-02
 */
@Service
public class SalesReturnInboundServiceImpl implements ISalesReturnInboundService 
{
    @Autowired
    private SalesReturnInboundMapper salesReturnInboundMapper;

    /**
     * 查询销售退货入库管理
     * 
     * @param salesId 销售退货入库管理主键
     * @return 销售退货入库管理
     */
    @Override
    public SalesReturnInbound selectSalesReturnInboundBySalesId(Long salesId)
    {
        return salesReturnInboundMapper.selectSalesReturnInboundBySalesId(salesId);
    }

    /**
     * 查询销售退货入库管理列表
     * 
     * @param salesReturnInbound 销售退货入库管理
     * @return 销售退货入库管理
     */
    @Override
    public List<SalesReturnInbound> selectSalesReturnInboundList(SalesReturnInbound salesReturnInbound)
    {
        return salesReturnInboundMapper.selectSalesReturnInboundList(salesReturnInbound);
    }

    /**
     * 新增销售退货入库管理
     * 
     * @param salesReturnInbound 销售退货入库管理
     * @return 结果
     */
    @Override
    public int insertSalesReturnInbound(SalesReturnInbound salesReturnInbound)
    {
        salesReturnInbound.setCreateTime(new Date());
        return salesReturnInboundMapper.insertSalesReturnInbound(salesReturnInbound);
    }

    /**
     * 修改销售退货入库管理
     * 
     * @param salesReturnInbound 销售退货入库管理
     * @return 结果
     */
    @Override
    public int updateSalesReturnInbound(SalesReturnInbound salesReturnInbound)
    {
        return salesReturnInboundMapper.updateSalesReturnInbound(salesReturnInbound);
    }

    /**
     * 批量删除销售退货入库管理
     * 
     * @param salesIds 需要删除的销售退货入库管理主键
     * @return 结果
     */
    @Override
    public int deleteSalesReturnInboundBySalesIds(Long[] salesIds)
    {
        return salesReturnInboundMapper.deleteSalesReturnInboundBySalesIds(salesIds);
    }

    /**
     * 删除销售退货入库管理信息
     * 
     * @param salesId 销售退货入库管理主键
     * @return 结果
     */
    @Override
    public int deleteSalesReturnInboundBySalesId(Long salesId)
    {
        return salesReturnInboundMapper.deleteSalesReturnInboundBySalesId(salesId);
    }
}
